# 好的，我会在每个示例中添加中文显示设置，并分开绘制每种图表类型。
#
# ### 理论部分
# #### 连续型时间数据可视化
# - 折线图
#
# ```python
# import matplotlib.pyplot as plt
# import numpy as np
#
# # 设置显示中文
# plt.rcParams['font.sans-serif'] = ['SimHei']
# plt.rcParams['axes.unicode_minus'] = False
#
# # 数据准备
# time = np.arange(10)
# data = np.random.rand(10)
#
# # 折线图
# plt.plot(time, data, color='blue')  # 改变颜色
# plt.title('折线图')
# plt.xlabel('时间')
# plt.ylabel('数据值')
# plt.show()
# ```
#
# #### 离散型时间数据可视化
# - 散点图
#
# ```python
# import matplotlib.pyplot as plt
# import numpy as np
#
# # 设置显示中文
# plt.rcParams['font.sans-serif'] = ['SimHei']
# plt.rcParams['axes.unicode_minus'] = False
#
# # 数据准备
# time = np.arange(10)
# data = np.random.rand(10)
#
# # 散点图
# plt.scatter(time, data, color='red', s=50)  # 改变颜色和大小
# plt.title('散点图')
# plt.xlabel('时间')
# plt.ylabel('数据值')
# plt.show()
# ```
#
# - 柱形图
#
# ```python
# import matplotlib.pyplot as plt
# import numpy as np
#
# # 设置显示中文
# plt.rcParams['font.sans-serif'] = ['SimHei']
# plt.rcParams['axes.unicode_minus'] = False
#
# # 数据准备
# time = np.arange(10)
# data = np.random.rand(10)
#
# # 柱形图
# plt.bar(time, data, color='green')  # 改变颜色
# plt.title('柱形图')
# plt.xlabel('时间')
# plt.ylabel('数据值')
# plt.show()
# ```
#
# - 堆叠柱形图
#
# ```python
# import matplotlib.pyplot as plt
# import numpy as np
#
# # 设置显示中文
# plt.rcParams['font.sans-serif'] = ['SimHei']
# plt.rcParams['axes.unicode_minus'] = False
#
# # 数据准备
# time = np.arange(10)
# data1 = np.random.rand(10)
# data2 = np.random.rand(10)
#
# # 堆叠柱形图
# plt.bar(time, data1, label='数据1', color='blue')  # 改变颜色
# plt.bar(time, data2, bottom=data1, label='数据2', color='orange')  # 改变颜色
# plt.title('堆叠柱形图')
# plt.xlabel('时间')
# plt.ylabel('数据值')
# plt.legend()
# plt.show()
# ```
#
# ### 比例型数据可视化
# - 饼图
#
# ```python
# import matplotlib.pyplot as plt
#
# # 设置显示中文
# plt.rcParams['font.sans-serif'] = ['SimHei']
# plt.rcParams['axes.unicode_minus'] = False
#
# # 数据准备
# labels = ['A', 'B', 'C', 'D']
# sizes = [15, 30, 45, 10]
#
# # 饼图
# plt.pie(sizes, labels=labels, autopct='%1.1f%%', startangle=140, colors=['red', 'blue', 'green', 'yellow'])  # 改变颜色
# plt.title('饼图')
# plt.show()
# ```
#
# - 环形图
#
# ```python
# import matplotlib.pyplot as plt
#
# # 设置显示中文
# plt.rcParams['font.sans-serif'] = ['SimHei']
# plt.rcParams['axes.unicode_minus'] = False
#
# # 数据准备
# labels = ['A', 'B', 'C', 'D']
# sizes = [15, 30, 45, 10]
#
# # 环形图
# plt.pie(sizes, labels=labels, autopct='%1.1f%%', startangle=140, wedgeprops=dict(width=0.3), colors=['purple', 'orange', 'blue', 'pink'])  # 改变颜色和宽度
# plt.title('环形图')
# plt.show()
# ```
#
# ### 关系型数据可视化
# - 散点图
#
# ```python
# import matplotlib.pyplot as plt
# import numpy as np
#
# # 设置显示中文
# plt.rcParams['font.sans-serif'] = ['SimHei']
# plt.rcParams['axes.unicode_minus'] = False
#
# # 数据准备
# x = np.random.rand(50)
# y = np.random.rand(50)
#
# # 散点图
# plt.scatter(x, y, color='red', s=50)  # 改变颜色和大小
# plt.title('散点图')
# plt.xlabel('X轴')
# plt.ylabel('Y轴')
# plt.show()
# ```
#
# - 散点图矩阵
#
# ```python
# import seaborn as sns
# import pandas as pd
#
# # 设置显示中文
# plt.rcParams['font.sans-serif'] = ['SimHei']
# plt.rcParams['axes.unicode_minus'] = False
#
# # 数据准备
# data = pd.DataFrame(np.random.randn(100, 4), columns=['A', 'B', 'C', 'D'])
#
# # 散点图矩阵
# sns.pairplot(data, diag_kind='kde', plot_kws={'color':'red'})  # 改变颜色
# plt.title('散点图矩阵')
# plt.show()
# ```
#
# - 气泡图
#
# ```python
# import matplotlib.pyplot as plt
# import numpy as np
#
# # 设置显示中文
# plt.rcParams['font.sans-serif'] = ['SimHei']
# plt.rcParams['axes.unicode_minus'] = False
#
# # 数据准备
# x = np.random.rand(50)
# y = np.random.rand(50)
# size = 1000 * np.random.rand(50)
#
# # 气泡图
# plt.scatter(x, y, s=size, alpha=0.5, color='cyan')  # 改变颜色和大小
# plt.title('气泡图')
# plt.xlabel('X轴')
# plt.ylabel('Y轴')
# plt.show()
# ```
#
# - 茎叶图
#
# ```python
# import stemgraphic
# import matplotlib.pyplot as plt
# import numpy as np
#
# # 设置显示中文
# plt.rcParams['font.sans-serif'] = ['SimHei']
# plt.rcParams['axes.unicode_minus'] = False
#
# # 数据准备
# data = np.random.normal(0, 1, 100)
#
# # 茎叶图
# stemgraphic.stem_graphic(data, stem_color='blue')  # 改变颜色
# plt.title('茎叶图')
# plt.show()
# ```
#
# - 直方图
#
# ```python
# import matplotlib.pyplot as plt
# import numpy as np
#
# # 设置显示中文
# plt.rcParams['font.sans-serif'] = ['SimHei']
# plt.rcParams['axes.unicode_minus'] = False
#
# # 数据准备
# data = np.random.normal(0, 1, 100)
#
# # 直方图
# plt.hist(data, bins=10, color='magenta')  # 改变颜色
# plt.title('直方图')
# plt.xlabel('数据值')
# plt.ylabel('频率')
# plt.show()
# ```
#
# - 密度图
#
# ```python
# import matplotlib.pyplot as plt
# import numpy as np
# import seaborn as sns
#
# # 设置显示中文
# plt.rcParams['font.sans-serif'] = ['SimHei']
# plt.rcParams['axes.unicode_minus'] = False
#
# # 数据准备
# data = np.random.normal(0, 1, 100)
#
# # 密度图
# sns.kdeplot(data, color='orange')  # 改变颜色
# plt.title('密度图')
# plt.show()
# ```
#
# ### 文本类型数据可视化
# - 标签云
#
# ```python
# from wordcloud import WordCloud
# import matplotlib.pyplot as plt
#
# # 设置显示中文
# plt.rcParams['font.sans-serif'] = ['SimHei']
# plt.rcParams['axes.unicode_minus'] = False
#
# # 数据准备
# text = '数据 可视化 标签 云 词云'
#
# # 标签云
# wordcloud = WordCloud(width=480, height=480, margin=0, background_color='white', colormap='viridis').generate(text)  # 改变背景颜色和颜色映射
# plt.imshow(wordcloud, interpolation='bilinear')
# plt.axis('off')
# plt.title('标签云')
# plt.show()
# ```
#
# ### 复杂类型数据可视化
# - 散点图
#
# ```python
# import matplotlib.pyplot as plt
# import numpy as np
#
# # 设置显示中文
# plt.rcParams['font.sans-serif'] = ['SimHei']
# plt.rcParams['axes.unicode_minus'] = False
#
# # 数据准备
# x = np.random.rand(50)
# y = np.random.rand(50)
#
# # 散点图
# plt.scatter(x, y, color='red', s=50)  # 改变颜色和大小
# plt.title('散点图')
# plt.xlabel('X轴')
# plt.ylabel('Y轴')
# plt.show()
# ```
#
# - 散点图矩阵
#
# ```python
# import seaborn as sns
# import pandas as pd
#
# # 设置显示中文
# plt.rcParams['font.sans-serif'] = ['SimHei']
# plt.rcParams['axes.unicode_minus'] = False
#
# # 数据准备
# data = pd.DataFrame(np.random.randn(100, 4), columns=['A', 'B', 'C', 'D'])
#
# # 散点图矩阵
# sns.pairplot(data, diag_kind='kde', plot_kws={'color':'red'})  # 改变颜色
# plt.title('散点图矩阵')
# plt.show()
# ```
#
# - 平行坐标
#
# ```python
# import matplotlib.pyplot
#
#  as plt
# import pandas as pd
# from pandas.plotting import parallel_coordinates
#
# # 设置显示中文
# plt.rcParams['font.sans-serif'] = ['SimHei']
# plt.rcParams['axes.unicode_minus'] = False
#
# # 数据准备
# data = pd.DataFrame(np.random.randn(100, 5), columns=['A', 'B', 'C', 'D', 'E'])
#
# # 平行坐标
# parallel_coordinates(data, 'A', color=['blue', 'green', 'red', 'cyan', 'magenta'])  # 改变颜色
# plt.title('平行坐标')
# plt.show()
# ```
#
# - 雷达图
#
# ```python
# import matplotlib.pyplot as plt
# import numpy as np
#
# # 设置显示中文
# plt.rcParams['font.sans-serif'] = ['SimHei']
# plt.rcParams['axes.unicode_minus'] = False
#
# # 数据准备
# labels = ['A', 'B', 'C', 'D', 'E']
# stats = [20, 34, 30, 35, 27]
#
# angles = np.linspace(0, 2 * np.pi, len(labels), endpoint=False).tolist()
# stats = stats + stats[:1]
# angles = angles + angles[:1]
#
# # 雷达图
# fig, ax = plt.subplots(figsize=(6, 6), subplot_kw=dict(polar=True))
# ax.fill(angles, stats, color='blue', alpha=0.25)  # 改变颜色和透明度
# ax.plot(angles, stats, color='blue', linewidth=2)  # 改变颜色和宽度
#
# ax.set_yticklabels([])
# ax.set_xticks(angles[:-1])
# ax.set_xticklabels(labels)
#
# plt.title('雷达图')
# plt.show()
# ```
#
# ### 工具部分
# #### Excel基础图形绘制
# ```python
# # Excel基础图形绘制示例代码在笔记中，具体操作通过Excel软件完成
# ```
#
# #### PowerBI：豆瓣电影Top250
# ```python
# # PowerBI可视化示例，具体操作通过PowerBI软件完成
# ```
#
# #### openpyxl：工作簿增删改查
#
# ```python
# import openpyxl
# from openpyxl.styles import Font
#
# # 创建新工作簿
# wb = openpyxl.Workbook()
# ws = wb.active
# ws.title = "Sheet1"
#
# # 增加数据
# ws['A1'] = 'Hello'
# ws['B1'] = 'World'
#
# # 修改字体颜色和大小
# ws['A1'].font = Font(color="FF0000", size=20)  # 改变颜色和大小
# ws['B1'].font = Font(color="0000FF", size=12)  # 改变颜色和大小
#
# # 保存工作簿
# wb.save('example.xlsx')
# ```
#
# #### matplotlib基础图表绘制：柱状图
#
# ```python
# import matplotlib.pyplot as plt
#
# # 设置显示中文
# plt.rcParams['font.sans-serif'] = ['SimHei']
# plt.rcParams['axes.unicode_minus'] = False
#
# # 数据准备
# categories = ['A', 'B', 'C', 'D']
# values = [3, 7, 5, 4]
#
# # 柱状图
# plt.bar(categories, values, color=['red', 'blue', 'green', 'yellow'])  # 改变颜色
# plt.title('柱状图')
# plt.xlabel('类别')
# plt.ylabel('值')
# plt.show()
# ```
#
# ### 实验部分
# #### Excel可视化大屏
# ```python
# # Excel可视化大屏示例，具体操作通过Excel软件完成
# ```
#
# #### PowerBI Top250
# ```python
# # PowerBI Top250示例，具体操作通过PowerBI软件完成
# ```
#
# 希望这些示例和注释能帮助你更好地理解如何实现这些图表。如果有其他具体需求，请告诉我！